import axios from "axios";

export default {
    httpRequest(methods, url, params, data) {
        return axios({
            methods,
            url,
            data,
            baseURL: '/api',
            params,
            timeout: 10000,
            headers: {
                'content-type': 'application/json;charset=utf-8'
            },
        }).then(response => {
            return response.data; //获取响应结果的数据
        });
    },
};